@prefix-cls: ~'inbiz-PersonalInfo';

.textEllipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.@{prefix-cls} {
  min-height: 60px;
  font-size: 14px;

  &-Popover {
    .ant-popover-inner-content {
      padding: 0;
    }

    .ant-popover-arrow {
      display: none;
    }

    .ant-popover-content {
      margin-top: -15px;
    }
  }

  &-Popover-c {
    .ant-popover-content {
      margin-right: -6px;
    }

    .ant-popover-inner-content {
      padding: 0;
    }

    .ant-popover-arrow {
      display: none;
    }

    .simpleview-ul-box {
      .simpleview-li-box {
        position: relative;
        width: 200px;
        min-height: 56px;
        padding: 8px;
        background-color: #fff;
        border: solid 1px #ddd;
        border-radius: 4px;
        box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12);

        .simpleview-li-children {
          width: 182px;
          height: 40px;
          padding: 0 8px;
          color: var(--inbiz-color-heading);
          font-weight: normal;
          font-size: var(--inbiz-font-size-base);
          font-stretch: normal;
          line-height: 40px;
          letter-spacing: 0;
          cursor: pointer;
          .textEllipsis();

          &:hover {
            width: 100%;
            height: 40px;
            background-color: #f5f5f5;
            border-radius: 4px;
          }

          span {
            display: inline-block;
            width: 10px;
            height: 10px;
            margin-right: 8px;
            border-radius: 2px;
          }
        }

        .simpleview-li-children-selected {
          background-color: #f5f5f5;
        }
      }
    }
  }

  &-lang {
    margin-right: 20px;
    border-radius: 10px;
    cursor: pointer;

    &-dropdown .ant-dropdown-menu {
      width: 145px;
      max-height: 166px;
      margin-top: 20px;
      padding: 8px;
      overflow-y: auto;
      border: 1px solid #ddd;
      border-radius: 4px;
      box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12);
      scrollbar-width: none;

      &::-webkit-scrollbar {
        width: 6px;
        height: 6px;
        background-color: transparent;
        transition: background-color 0.25s ease-in-out;
      }

      &::-webkit-scrollbar-thumb {
        background-color: transparent;
      }

      &:hover {
        &::-webkit-scrollbar {
          background-color: #ddd;
          border-radius: 4px;
        }

        /* 定义滚动条轨道内阴影+圆角 */
        &::-webkit-scrollbar-track {
          background-color: #f5f5f5;
          border-radius: 4px;

          --webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
        }

        /* 定义滑块内阴影+圆角 */
        &::-webkit-scrollbar-thumb {
          background-color: #ddd;
          border-radius: 4px;

          --webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
        }
      }

      .ant-dropdown-menu-item {
        width: 120px;
        height: 40px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
    }

    .ant-btn {
      width: 100px;
      padding: 4px 10px;
      color: #666;
      font-size: 14px;
      text-align: unset;
      border-radius: 20px;
    }
  }

  &-SmallView {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 60px;
    padding-right: 10px;
  }

  &-SmallView-ImgHead {
    width: 36px;
    height: 36px;
    margin-right: 8px;
    overflow: hidden;
    border-radius: 50%;
    cursor: pointer;
  }

  &-SmallView-ImgHead-Img {
    width: 100%;
    height: 100%;
  }

  &-SmallView-box {
    height: 42px;
    font-size: 14px;
    line-height: 14px;
  }

  &-SmallView-name {
    min-width: 60px;
    max-width: 95px;
    height: 24px;
    line-height: 24px;

    .ant-typography {
      color: inherit;
    }
  }

  &-SmallView-btn {
    height: 24px;
    line-height: 14px;
    cursor: pointer;
    opacity: 0.8;
  }

  &-CardView-Title {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: auto;
    color: #333;
    font-size: 20px;
  }

  &-CardView-title-icon {
    margin-right: 10px;
    color: #999;
  }

  &-card-popover {
    .card-view-option {
      width: 75px;
      height: 70px;
      text-align: center;

      li {
        height: 35px;
        overflow: hidden;
        color: var(--inbiz-color-text);
        line-height: 35px;
        white-space: nowrap;
        text-overflow: ellipsis;
        cursor: pointer;

        &:hover {
          background: #eee;
        }
      }
    }

    .ant-popover-content {
      margin-top: -25px;
    }

    .ant-popover-inner-content {
      padding: 0;
    }

    .ant-popover-arrow {
      display: none;
    }
  }

  &-CardView-Info {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: center;

    .cardview-tips {
      position: absolute;
      top: 20px;
      right: 20px;
      cursor: pointer;
    }
  }

  &-CardView-ImgHead {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 50%;
  }

  &-CardView-ImgHead-Img {
    width: 100%;
    height: 100%;
  }

  &-CardView-name {
    padding-top: 5px;
    color: var(--inbiz-color-heading);
    font-size: 20px;
    background-image: none;
  }

  &-CardView-btn {
    height: 15px;
    margin-top: 8px;
    color: var(--inbiz-color-secondary-text);
    font-size: 14px;
    line-height: 14px;
    background-image: none;
    cursor: pointer;
  }

  &-CardView-email {
    display: block;
    width: 140px;
    margin: 0 auto;
    margin-top: 20px;
    color: var(--inbiz-color-text);
    font-size: 12px;
    text-align: left;

    div {
      width: 100%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }

  &-simpleview {
    display: flex;
    justify-content: flex-end;
    min-height: 60px;
    cursor: pointer;
  }

  &-simpleview-infobox {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding-right: 12px;
    font-size: 12px;

    .inbiz-PersonalInfo-simpleview-name {
      max-width: 95px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;

      .ant-typography {
        color: inherit;
      }
    }

    &:hover {
      .inbiz-PersonalInfo-simpleview-name {
        // 可能会与背景色产生影响，暂时屏蔽,改用透明度
        // color: var(--inbiz-color-primary);
        opacity: 0.9;
      }
    }
  }

  &-simpleview-head {
    width: 36px;
    height: 36px;
    margin-right: 10px;
    overflow: hidden;
    color: #666;
    border-radius: 50%;
  }

  &-simpleview-head-img {
    width: 100%;
    height: 100%;
  }

  &-simpleview-option {
    width: 240px;
    min-height: 83px;
    padding: 6px 8px 8px;
    background-color: #fff;
    border: solid 1px #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12);

    .simpleview-top {
      display: flex;
      flex-direction: row;
      align-items: center;
      width: 100%;
      height: 67px;
      border-bottom: solid 1px #eee;

      .simpleview-top-head {
        width: 48px;
        height: 48px;
        margin-right: 16px;
        overflow: hidden;
        border-radius: 50%;

        img {
          width: 100%;
          height: 100%;
        }
      }

      .simpleview-right {
        .simpleview-right-name {
          width: 145px;
          margin-top: 4px;
          overflow: hidden;
          font-weight: normal;
          font-size: 18px;
          font-stretch: normal;
          line-height: 20px;
          letter-spacing: 0;
          white-space: nowrap;
          text-overflow: ellipsis;
        }

        .simpleview-right-position {
          font-weight: normal;
          font-stretch: normal;
          line-height: 24px;
          letter-spacing: 0;
          width: 150px;
          text-overflow: ellipsis;
          overflow: hidden;
          white-space: nowrap;
        }
      }
    }

    .simpleview-ul {
      padding-top: 8px;

      .simpleview-li {
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: center;
        height: 40px;
        padding: 0 8px;
        color: var(--inbiz-color-heading);
        font-weight: normal;
        font-size: var(--inbiz-font-size-base);
        font-stretch: normal;
        line-height: 40px;
        letter-spacing: 0;
        cursor: pointer;

        &:hover {
          width: 100%;
          height: 40px;
          background-color: #f5f5f5;
          border-radius: 4px;
        }

        .simpleview-li-arr {
          display: inline-block;
          width: 0;
          height: 0;
          border-top: 5px solid transparent;
          border-bottom: 5px solid transparent;
          border-left: 6px solid #aaa;
        }

        div {
          width: 220px;
          .textEllipsis();
        }
      }

      .loginoutBoxLine {
        height: 1px;
        margin-top: 8px;
        margin-bottom: 8px;
        background-color: #eee;
      }

      .loginoutBox {
        color: #f25b43;
        line-height: 30px;
      }
    }
  }

  &-simpleview-bottom {
    position: absolute;
    top: 60px;
    right: 6px;
    z-index: 9999;
  }

  &-openMoal {
    .ant-modal-body {
      height: calc(100% - 122px);
    }
  }
}